#include <stdio.h>

int q[(int)1e5];
int n, k;

int main()
{
	scanf("%d", &n);
	
	for (int i = 0; i < n; i ++ )
	{
		scanf("%d", &q[i]);
	}
	
	scanf("%d", &k);
	
	int res = -1;
	
	for (int i = 0;i < n; i ++ )
		if (q[i] == k)
		{
			res = i;
			break;	
		} 
		
	printf("%d", res);
		
	return 0;
		
} 
